/*
 * Copyright (C) 2011, EADS France
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package xowl.interpreter.backends.rdf;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 *
 * @author Laurent WOUTERS
 */
public class RDFChangeset extends xowl.interpreter.Changeset {
    private List<RDFChange> rdf;
    
    public Collection<RDFChange> getRDFChanges() { return rdf; }
    
    public RDFChangeset() {
        this.rdf = new ArrayList<RDFChange>();
    }
    
    public void add(RDFChange change) { rdf.add(change); }
    
    public RDFChangeset getNegative() {
        RDFChangeset negative = new RDFChangeset();
        for (int i=rdf.size()-1; i!=-1; i--)
            negative.rdf.add(rdf.get(i).getNegative());
        return negative;
    }
}
